﻿CREATE FUNCTION [dbo].[WeekStart](
	@Date datetime
)RETURNS datetime WITH SCHEMABINDING
AS
BEGIN 
RETURN DATEADD(dd,-DATEPART(dw,@Date)+1,DATEDIFF(dd,0,@Date))
END

